
$(document).ready(function(){
  
   var content = $('#image_div').html();
    $('body').delegate('.add-cnt', 'click', function() {
        $(this).parents('#after_image').after(content);
        return false;
    });
    
     $('body').delegate('.remove-cnt', 'click', function() {
            $(this).parents('#after_image').remove();
            return false;
     });
     
     $('.delete-image').click(function() {
            var bool = confirm("Are you sure you want to delete this image?");
            if (bool) {
                var postdata = {};
                var prji_id = $(this).attr('imageid');
                postdata['prji_id'] = prji_id;
                jQuery.post( '/seven/request_form.php?action=delete', postdata, function() {
                    history.go(0);
                });
            }
            return false;
        });
        
});